#include<stdio.h>
#define LINE_SIZE 129


int main(int argc, char* argv[]) {
    char input[LINE_SIZE], prev_line[LINE_SIZE];

    if(gets(prev_line) != NULL) {
        while(gets(input) != NULL) {
            if(strcmp(input, prev_line) != 0) {
                strcpy(prev_line, input);
                printf("%s\n", input);
            }
        }
    }
    return 0;
}